import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/index',
    component: () => import('@/views/Home.vue'),
    children: [
      {
        path: '/index',
        component: () => import('@/views/Layout/Index.vue')
      },
      {
        path: '/classify',
        component: () => import('@/views/Layout/Classify.vue')
      },
      { path: '/issue', component: () => import('@/views/Layout/Issue.vue') },
      { path: '/user', component: () => import('@/views/Layout/User.vue') }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
